import "babel-polyfill"
import Es6Promise from 'es6-promise'
require('es6-promise').polyfill()
Es6Promise.polyfill();

import Vue from "vue";

import App from "./App.vue";
import router from "./router/index";

import '@/utils/vConsole.js';

import "@/assets/style/index.less";

import $constUrl from '@/api/const.js'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import $axios from "./utils/request.js";
import $axios2 from "./utils/request2.js";

import mixin from "./mixin/index";
import store from "./store/index";
import * as filters from "@/utils/filters";
import vuescroll from 'vuescroll'
// import VideoPlayer from 'vue-video-player'
// import 'vue-video-player/src/custom-theme.css'
// import 'video.js/dist/video-js.css'
// import Videojs from 'video.js'
// import 'video.js/dist/video-js.css'
// Vue.prototype.$video = Videojs
// import VueCoreVideoPlayer from 'vue-core-video-player'
// Vue.use(VueCoreVideoPlayer, {
//   lang: 'zh-CN'
// })
import "@/components/Vant";
// rem
import "amfe-flexible";
import './views/global.less';
import Meta from 'vue-meta'
//引用封装组件
import $components from '@/components.js'
// 全局通用方法
import common from "@/utils/common.js";
Vue.use(vuescroll)
Vue.prototype.common = common;

import  HttpContent from "@/lib/HttpContent";
import VueDPlayer from 'vue-dplayer';
import 'vue-dplayer/dist/vue-dplayer.css';
import { PullRefresh,Skeleton } from 'vant';

Vue.use(VueDPlayer);
Vue.use(ElementUI);
// Vue.use(VideoPlayer)
import DatePicker from '@/components/DatePicker.vue';
Vue.use(DatePicker);
Vue.component('DatePicker', DatePicker);
Vue.use(PullRefresh);
Vue.use(Skeleton);
import FileUpload from '@/components/Attach/FileUpload.vue';
Vue.use(FileUpload);
Vue.component('FileUpload', FileUpload);
// import { createApp } from 'vue'
// let app = createApp(App)

// import vue3videoPlay from 'vue3-video-play' // 引入组件
// import 'vue3-video-play/dist/style.css' // 引入css
// app.use(vue3videoPlay)

import moment from 'moment' //导入文件
Vue.prototype.$moment = moment; //赋值使用




// 把变量挂载到vue的原型上
Vue.prototype.$store = store;
Vue.prototype.$axios = $axios;
Vue.prototype.$axios2 = $axios2;
Vue.prototype.$constUrl = $constUrl;
Vue.prototype.HttpContent =HttpContent
Vue.mixin(mixin);

Vue.config.productionTip = false;

import VueAMap from "vue-amap";
Vue.use(VueAMap);
// 初始化vue-amap
VueAMap.initAMapApiLoader({
  key: "76eea98fef61c52919eb236c52952024", // 这里写你申请的高德地图的key
  // plugin: ["AMap.Autocomplete", "AMap.Geocoder", "AMap.Geolocation"],
  plugin: [
    "AMap.Autocomplete", //输入提示插件
    "AMap.PlaceSearch", //POI搜索插件
    "AMap.Scale", //右下角缩略图插件 比例尺
    "AMap.OverView", //地图鹰眼插件
    "AMap.ToolBar", //地图工具条
    "AMap.MapType", //类别切换控件，实现默认图层与卫星图、实施交通图层之间切换的控制
    "AMap.PolyEditor", //编辑 折线多，边形
    "AMap.CircleEditor", //圆形编辑器插件
    "AMap.Geolocation" //定位控件，用来获取和展示用户主机所在的经纬度位置
  ],
//   plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor'],
  v: "1.4.15",
  uiVersion: "1.1"
});


// import {Base64} from 'js-base64'
// Vue.use(Base64);
Vue.use(Meta)

Object.keys($components).forEach(key => {
    Vue.use($components[key]);
    Vue.component(key, $components[key]);
})

Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key]) //插入过滤器名和对应方法
})
new Vue({
    store,
    router,
    render: h => h(App),
}).$mount("#app");